//
//  HomeRecentOrderView.m
//  KuWeiPark
//
//  Created by Kevin Su on 15/5/12.
//  Copyright (c) 2015年 Clief. All rights reserved.
//

#import "HomeRecentOrderView.h"

@implementation HomeRecentOrderView

- (void)awakeFromNib{
    
    self.guideBtn.layer.masksToBounds = YES;
    self.guideBtn.layer.cornerRadius = 3;
    self.guideBtn.layer.borderColor = [UIColor whiteColor].CGColor;
    self.guideBtn.layer.borderWidth = 1;
    
    UITapGestureRecognizer *tapgesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showorderDetail:)];
    [self addGestureRecognizer:tapgesture];
}

- (void)initDataWithOrderModel:(BookParkingPortOrderModel *)model{
    
    self.orderModel = model;
    
//    self.nameLabel.text = model.parkingName;
}

- (IBAction)guideAction:(id)sender {
    
    if(self.delegate && [self.delegate respondsToSelector:@selector(guideToDestinationWithOrderModel:)]){
        
        [self.delegate guideToDestinationWithOrderModel:self.orderModel];
    }
}

- (void)showorderDetail:(UITapGestureRecognizer *)recognizer{
    
    if(self.delegate && [self.delegate respondsToSelector:@selector(showOrderDetailViewWithOrderModel:)]){
        
        [self.delegate showOrderDetailViewWithOrderModel:self.orderModel];
    }
}

@end
